﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using SERP.StringMappings;
using SERP.DAO;
using SERP.Controllers;
namespace SERP.Modules.BinaryData{
	public partial class BinaryDataViewInfo : SERP.Modules.ModuleBase
	{
		private BinaryDataController controller = new BinaryDataController();
		public BinaryDataController Controller{
			get{
				return controller;
			} 
		}
		protected void Page_Load(object sender, EventArgs e){
    		LoadLanguage();	
			if(!this.IsPostBack){		
				BindInfo();	
			}
		}
		//Load All lable text
		private void LoadLanguage(){
			labelData.Text=BinaryDataStringMapping.Data+":";
			labelFileName.Text=BinaryDataStringMapping.FileName+":";
		}
		public BinaryDataEntity GetObject(){
			controller.LoadObject(Int32.Parse(Request["BinaryDataId"]));
			return controller.BinaryDataObject;
		}
		private void BindInfo(){
			BinaryDataEntity o=GetObject();		
			CopyToSreen(o);
		}
		private void CopyToSreen(BinaryDataEntity o){
			//Coder implement here
			//CopyBinaryToScreen(o.Data);
			//End					
			txtFileName.Text=o.FileName;
		}   
}
}
